<template>
    <el-form label-width="80px">
        <el-form-item label="sku名称">
            <el-input placeholder="请输入SKU名称"></el-input>
        </el-form-item>
        <el-form-item label="价格(元)">
            <el-input placeholder="请输入价格" type="number"></el-input>
        </el-form-item>
        <el-form-item label="重量(克)">
            <el-input placeholder="请输入重量" type="number"></el-input>
        </el-form-item>
        <el-form-item label="sku描述">
            <el-input type="textarea" placeholder="请输入sku描述" resize="none" v-model="test"></el-input>
        </el-form-item>
        <el-form-item label="平台属性">
            <el-form label-width="auto" :inline="true">
                <el-form-item v-for="(title, index) in platAttributes" :key="index" :label="title"
                    class="platform_attributes" clearable>
                    <el-select placeholder="请选择">
                        <el-option v-for="item in options" :key="item" :label="item" :value="item">
                        </el-option>
                    </el-select>
                </el-form-item>
            </el-form>
            <!-- <view v-for="(title, index) in platAttributes" :key="index" class="platform_attributes">
                <span>{{ title }}</span>

            </view> -->
        </el-form-item>
        <el-form-item label="销售属性">
            <el-select placeholder="请选择" clearable>
                <el-option v-for="item in options" :key="item" :label="item" :value="item">
                </el-option>
            </el-select>
        </el-form-item>
        <el-form-item label="图片名称">
            <el-table style="width: 100%" border>
                <el-table-column type="selection" width="80px" align="center">
                </el-table-column>
                <el-table-column prop="" label="图片">
                </el-table-column>
                <el-table-column prop="" label="名称">
                </el-table-column>
                <el-table-column prop="" label="操作">
                    <el-button type="danger">设为默认</el-button>
                </el-table-column>
            </el-table>
        </el-form-item>
        <el-form-item>
            <el-button type="primary">保存</el-button>
            <el-button @click="$emit('changeSceneSon', false)">取消</el-button>
        </el-form-item>
    </el-form>
</template>

<script setup lang="ts">
import { ref } from 'vue';

let platAttributes = ['手机一级', '电池容量', '运行内存', '机身内存', 'CPU型号', '屏幕尺寸']
let options = [1, 2, 3, 4, 5]

let test = ref()
// let $emit = defineEmits(['changeSceneSon'])
</script>

<style scoped>
.platform_attributes {
    margin: 5px 10px;
}
</style>